package svc

import (
	"day1/api/internal/config"
	"day1/day1rpc/day1rpcclient"
	"github.com/zeromicro/go-zero/zrpc"
)

type ServiceContext struct {
	Config  config.Config
	Day1Rpc day1rpcclient.Day1rpc
}

func NewServiceContext(c config.Config) *ServiceContext {
	return &ServiceContext{
		Config:  c,
		Day1Rpc: day1rpcclient.NewDay1rpc(zrpc.MustNewClient(c.Day1Rpc)),
	}
}
